﻿using Model.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Service.Util
{
    public class HostHolder
    {
        private static ThreadLocal<SysUser> users = new ThreadLocal<SysUser>();

        public void setUser(SysUser sysUser)
        {
            users.Value = sysUser;
        }

        public SysUser getUser()
        {
            return users.Value;
        }

        public void clear()
        {
            users.Dispose();
        }
    }
}
